package com.sample.demo.action;



import java.io.IOException;
import java.io.OutputStream;

import com.webkit.web.action.StreamAction;

public class DemoStreamAction extends StreamAction{


	private String name;
	

	private int value;
	
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public int getValue() {
		return value;
	}
	

	public void setValue(int value) {
		this.value = value;
	}

	public void execute(OutputStream output) {
		String data = String.format("STREAM: %s - %s", this.name ,this.value);
		try {
			output.write(data.getBytes());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
